package com.meal.base.controller.message;

import com.meal.base.service.message.MailService;
import com.meal.common.model.Result;
import com.meal.entity.model.tool.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @program: meal->MailController
 * @description: 邮件控制器
 * @author: yangzhanghui
 * @create: 2020-04-11 21:49
 **/
@Controller
public class MailController {

    @Autowired
    private MailService mailService;

    @RequestMapping("/mail")
    public Result mail(@RequestBody User user) {
        return mailService.sendMail(user);
    }
}
